import { _decorator, Component, Node,EventTarget } from 'cc';
const { ccclass, property } = _decorator;

const event_target = new EventTarget();
@ccclass('eventDispatcher')
export class eventDispatcher {
    private static data :eventDispatcher;
    static UPDATE_BLOCK_SIZE = "update_block_size";
    static TIPS_MSG = "tips_msg";
    static OPEN_REVIVE = "open_revive";
    static OPEN_OVER = "open_over";
    static REMOVE_ACTION = "remove_action";
    static REPLAY_GAME = "replay_game";
    static REFRESH_BUTTONS = "refresh_buttons";
    static get_target():EventTarget{
        if(eventDispatcher.data == null){
            eventDispatcher.data = new eventDispatcher();
        }
        return eventDispatcher.data.get_event_target();
    }
    private get_event_target():EventTarget{
        return event_target;
    }
}


